//
//  LBRCIMManager.h
//  app
//
//  Created by 刘文扬 on 16/8/26.
//  Copyright © 2016年 广东联结电子商务有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RongIMKit/RongIMKit.h"
#import "LBRCIMInfo.h"

@class LBRCIMManager;
@protocol LBRCIMManagerDelegate <NSObject>

-(void)didReceiveMessageWithManager:(LBRCIMManager *)manager message:(RCMessage *)message left:(NSInteger)left;

-(BOOL)onRCIMCustomLocalNotificationWithManager:(LBRCIMManager *)manager message:(RCMessage *)message withSenderName:(NSString *)senderName;

-(BOOL)onKickWithManager:(LBRCIMManager *)manager;

@end

@interface LBRCIMManager : NSObject<RCIMReceiveMessageDelegate>

/** info*/
@property(nonatomic,strong)LBRCIMInfo *rcIMInfo;

+(instancetype)shareInstance;

-(BOOL)saveRCIMInfo;

+(void)connectRongYunWithToken:(NSString *)token;

+(void)configureRongYun;

+(void)reConectRongYun;

+(void)initializeRongYun;

+(void)requestRongYunToken;

+(id)getMessageByMId:(long)mId;

+(void)logout;

+(void)sendTextMessageWithTargetIds:(NSMutableArray *)targetIds content:(NSString *)content;

+(NSInteger)getUnReadCountBy:(RCConversationType)conversationType
                    targetId:(NSString *)targetId;

+(NSInteger)getUnReadCount:(NSString *)targetId;

#pragma mark - 推送

+(void)setDeviceToken:(NSData *)deviceToken;

#pragma mark - 代理
//关于业务的抽取出来处理

/** delegate*/
@property(nonatomic,weak)id<LBRCIMManagerDelegate> delegate;

@end
